package com.onlineMIS.ORM.DAO.headQ.barCodeGentor;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.onlineMIS.ORM.entity.headQ.barcodeGentor.Menu;

@Service
public class MenuService {
	
	@Autowired
	private MenuDaoImpl menuDaoImpl;

	/**
	 * 根据菜单级别查询菜单集合信息
	 * @param level
	 * @return
	 */
	public List<Menu> getMenusByLevel(String level) {
		return menuDaoImpl.getMenusByLevel(level);
	}
	
	
	/**
	 * 根据菜单父级ID查询菜单集合信息
	 * @param level
	 * @return
	 */
	public List<Menu> getMenusByParentId(Integer menuId) {
		return menuDaoImpl.getMenusByParentId(menuId);
	}


	/**
	 * 根据菜单ID查询菜单信息
	 * @param id
	 * @return
	 */
	public Menu selectMenuById(Integer id) {
		return menuDaoImpl.get(id, true);
	}
	
	/**
	 * 根据菜单路径查询菜单信息
	 * @param id
	 * @return
	 */
	public Menu selectMenuByPath(String path) {
		return menuDaoImpl.getMenusByPath(path);
	}


	/**
	 * 根据菜单ID集合查询菜单信息
	 * @param menuIds
	 * @return
	 */
	public List<Menu> getMenusByIds(List<Integer> menuIds) {
		return menuDaoImpl.getMenusByIds(menuIds);
	}

}
